//
//  Team9BaseCollectionViewCell.m
//  Team9Project
//
//  Created by 朱嘉祺 on 15/10/12.
//  Copyright © 2015年 apple. All rights reserved.
//

#import "Team9BaseCollectionViewCell.h"

@implementation Team9BaseCollectionViewCell


#pragma mark 夜间模式
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
//        self.contentView.backgroundColor = [UIColor whiteColor];
        [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(changecolor) name:@"changecolor" object:nil];
    }
    return self;
}

- (void)changecolor{
    if ([Team9EveningType shareEvening].eveningFailling) {
        self.contentView.backgroundColor = [UIColor colorWithWhite:0.15 alpha:1];
    } else self.contentView.backgroundColor = [UIColor colorWithWhite:0.95 alpha:1];
}
- (void)layoutSubviews{
    [super layoutSubviews];
    [self changecolor];
}
- (void)dealloc{
    [[NSNotificationCenter defaultCenter] removeObserver:self];
}

@end
